<%--
  Created by IntelliJ IDEA.
  User: Inch
  Date: 2020/9/29
  Time: 17:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>UploadDownload</title>
</head>
<body>
    <p id="msg">message: ${message}</p>
<br>
<%--<script>--%>
<%--    alert(${uploadMessage})--%>
<%--</script>--%>
    <a href="${pageContext.request.contextPath}/jsp/uploadfile.jsp">Upload File</a>
    <br>
    <a href="${pageContext.request.contextPath}/jsp/uploadfiles.jsp">Upload Files</a>
    <br>
    <p>Download:hwmonitor_1.42.zip</p>
    <form id="form1" action="${pageContext.request.contextPath}/upload/download" >
        <img id="kaptcha" src="${pageContext.request.contextPath}/kaptcha.jpg" onclick="refresh()"/>
        <br>
        <input type="text" name="kaptcha">
        <br>
        <input type="submit" value="submit">
    </form>

<script>
    function refresh(){
        var img = document.getElementById("kaptcha");
        img.src="${pageContext.request.contextPath}/kaptcha.jpg";
    }

</script>
</body>
</html>
